home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
YERK
/
SUPPLEME
/
UNSUPPOR
/
OPTIONAL
/
NEEDADIS.K
< prev
next >
Wrap
Text File
|
1986-10-06
|
767b
|
40 lines
\ If you distribute your application on more than one disk and the program
\ needs a volume which is not online, call needAdisk to decide the best choice
\ disk to eject to allow for the needed volume.
\ 9/31/86 cdn Version 1
\ ( -- addr )
: defVCB $ 352 -base @ -base ;
0 variable DrvrRec 46 allot
\ ( drv# -- fCode )
: DriveStatus
DrvrRec 50 erase
8 DrvrRec 26 + w!
-5 DrvrRec 24 + w!
DrvrRec 22 + w!
DrvrRec fcall PBStatus
;
\ ( drv# -- fCode )
: DiskEject
DrvrRec 50 erase
7 DrvrRec 26 + w!
-5 DrvrRec 24 + w!
DrvrRec 22 + w!
DrvrRec fcall PBControl
;
\ Eject best choice disk to allow for new disk
: needAdisk
defVCB 72 + w@ 1 <>
IF 1 DiskEject drop
ELSE
2 DriveStatus drop
DrvrRec 32 + c@ 1 =
IF 2 ELSE 1 THEN
DiskEject drop
THEN
;